package com.zorn.platform.dictionary.action;

import com.zorn.core.provider.ActionSupportProvider;
import com.zorn.platform.dictionary.service.IDictionaryService;

public class DictionaryAction extends ActionSupportProvider {

	/* Fields
	================================================== */
	private IDictionaryService dictionaryService;

	/* Methods
	================================================== */
	public String query() {
		dictionaryService.query(getParameterMap());

		setJSONObject(dictionaryService.getResult());

		return JSON_RESULT;
	}

	public String count() {
		dictionaryService.count(getParameterMap());

		setJSONObject(dictionaryService.getResult());

		return JSON_RESULT;
	}

	public String insert() {
		dictionaryService.insert(getParameterMap());

		setJSONObject(dictionaryService.getResult());

		return JSON_RESULT;
	}

	public String update() {
		dictionaryService.update(getParameterMap());

		setJSONObject(dictionaryService.getResult());

		return JSON_RESULT;
	}

	public String delete() {
		dictionaryService.delete(getParameterMap());

		setJSONObject(dictionaryService.getResult());

		return JSON_RESULT;
	}

	/* Getters & Setters
	================================================== */
	public void setDictionaryService(IDictionaryService dictionaryService) {
		this.dictionaryService = dictionaryService;
	}

}